home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Gekkan Dennou Club 147
/
Gekkan Dennou Club - 2000.8 Vol. 147 (Japan).7z
/
Gekkan Dennou Club - 2000.8 Vol. 147 (Japan) (Track 1).bin
/
docs
/
ippon
/
data
/
expl
/
expllite.lzh
/
seq.c
< prev
Wrap
C/C++ Source or Header
|
1998-11-19
|
730b
|
49 lines
#include <stdlib.h>
#include "expl.h"
extern void bomb_init (short, short, int, int, char);
unsigned char seq_counter;
static seq_data[]=
{3, 5, 3, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
int seq_init0 (void)
{
return (0);
}
void seq_init (void)
{
seq_counter = 0;
}
void seq_move (void)
{
int i;
if ((seq_counter < 12) && ((i = seq_data[seq_counter]) > 0)) {
do {
double x, y, vx, vy;
x = drand ()* 12.0 - 6.0;
y = drand ()* 12.0 - 6.0;
vx = x * 65536.0 / 1.7;
vy = y * 65536.0 / 1.7;
bomb_init (
(short) x, (short) y,
(int) vx, (int) vy,
(char) (rand ()% 6 + 1));
} while (--i);
}
if (++seq_counter > 128)
seq_counter = 0;
}
void seq_tini (void)
{
}